import { Component, OnInit } from '@angular/core';
import { Mobile, MobileService } from '../mobile.service';

@Component({
  selector: 'app-mobile-item',
  template: `
    <div class="mobile-item">
      <h3>这里是mobile item</h3>
      current mobile: {{ mobile | json }}
    </div>
  `,
  styles: [
  ],
  providers: [MobileService]
})
export class MobileItemComponent implements OnInit {
  mobile: Mobile;
  constructor(private mobileServe: MobileService) {
    this.mobile = mobileServe.getMoible('m2');
  }

  ngOnInit(): void {
  }

}
